<script src="./vue.js"></script>

<div id="app">
    <button @click="add">添加</button>
    <button @click="del">删除</button>
    <table border="1">
        <tr>
            <td>编号</td>
            <td>姓名</td>
            <td>性别</td>
            <td>年龄</td>
        </tr>
        <tr v-for="item in strList">
            <td>{{item.cord}}</td>
            <td>{{item.uname}}</td>
            <td>{{item.sex}}</td>
            <td>{{item.age}}</td>
        </tr>
    </table>
</div>

<script>
    var vue = new Vue({
        el: '#app',
        data: {
            strList: []
        },
        methods: {
            add(){
                var str={
                    cord: "01",
                    uname: "张三",
                    sex: "男",
                    age: "23"
                };
                this.strList.push(str);
            },
            del() {
                this.strList.pop();
            }
        }
    })
</script>

<style>

</style>